package com.hjy.auth.feign;

import cn.hutool.core.io.IoUtil;
import com.hjy.auth.web.TestController;
import com.hjy.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.nio.charset.Charset;

@FeignClient("gulimall-test")
public interface TestFeignService {
    @RequestMapping("/test/1")
    public R test1();

    @RequestMapping(value = "/test/2", method = RequestMethod.PUT)
    public R test2(TestController.User user);

    @RequestMapping("/test/3")
    public R test3(TestController.User user);

    @RequestMapping("/test/4")
    public R test4(@RequestBody TestController.User user);

    @RequestMapping("/test/5")
    public R test5(@RequestBody TestController.User user);

    @RequestMapping(value = "/test/6")
    public R test6(@RequestBody TestController.User user ,@RequestParam String hello);

    @RequestMapping(value = "/test/7", method = RequestMethod.POST)
    public R test7(@RequestBody TestController.User user, @RequestParam("hello") String hello);

    @RequestMapping(value = "/test/8")
    public R test8(@RequestParam String hello1, @RequestParam("hello2") String hello2);

    @RequestMapping(value = "/test/9" ,method = RequestMethod.POST)
    public R test9(@RequestParam("hello1") String hello1, @RequestParam("hello2") String hello2);

    @RequestMapping(value = "/test/t/{id}")
    public R test10(@PathVariable("id") String id);
}
